package thread.example1;

/**
 * 操作进程
 */
public class ProcessDemo {
    public static void main(String[] args) throws  Exception {
        //开启记事本  方式1
        Runtime r = Runtime.getRuntime();
        r.exec("notepad");

        //方式2
        ProcessBuilder pb = new ProcessBuilder("notepad");
        pb.start();


    }
}
